home *** CD-ROM | disk | FTP | other *** search
- /* Misc.rexx */
- options results
- address 'MicroRexx'
-
- /* Create strings " and $ */
-
- q = d2c(34)
- d = d2c(36)
-
- /* Get current language for Locale test */
-
- x = 'english'
- if Open(in, "ENV:language",R) then do
- x = ReadLn(in)
- r = Close(in)
- end
-
- /* Set catalog file and string number */
-
- c = 'Locale:Catalogs/' || x || '/Sys/devs.catalog'
- n = 1
-
- /* Test MicroRexx commands */
-
- say "SysInfo"
- say "-------"
- 'CPU'
- say 'CPU type:' result
- 'OS'
- say 'OS version:' result
- 'WB'
- say 'Workbench:' result
- 'PAL'
- say 'PAL:' result
- 'NTSC'
- say 'NTSC:' result
- 'AGA'
- say 'AGA:' result
- 'VBR'
- say 'VBR is at address:' d || result
- 'LISA'
- say 'LISA version:' d || result
- 'VBL'
- say 'VBL frequency:' result 'Hz'
- 'POWER'
- say 'Power supply frequency:' result 'Hz'
- 'ECLOCK'
- say 'EClock frequency:' result 'Hz'
- 'TICKS'
- say 'Ticks since startup:' result
- 'MIPS'
- say 'MIPS:' result
- 'MFLOPS'
- say 'MFLOPS:' result
- 'IsFPU'
- say 'IsFPU:' result
- say ""
- say "Number formatting"
- say "-----------------"
- 'IFMT' 1234567
- say "1234567 ->" result
- 'RFMT' 1234.567
- say "1234.567 ->" result
- say ""
- say "Locale"
- say "------"
- 'IsLOCALE'
- say 'Locale support:' result
- say 'Current Language:' x
- 'LOCALE' c n '" --- Error --- "'
- say 'String #' || n 'of' q || c || q 'is' q || result || q
- say ""
- say "Crypting"
- say "--------"
- t = '"This is a test."'
- 'CRYPT' t
- x = result
- say t 'crypted is' q || x || q
- 'CRYPT' x
- say q || x || q 'crypted is' q || result || q
- say ""
- say "Workbench"
- say "---------"
- 'WBWIDTH'
- say 'Screen width:' result
- 'WBHEIGHT'
- say 'Screen height:' result
- 'WBDEPTH'
- say 'Screen depth:' result
- say ""
- say "Math functions"
- say "--------------"
- drop x
- x = 1.5
- 'ABS' x
- say abs x '=' result
- 'FRAC' x
- say frac x '=' result
- 'INT' x
- say int x '=' result
- 'RND' x
- say rnd x '=' result
- 'SGN' x
- say sng x '=' result
- 'COS' x
- say cos x '=' result
- 'SIN' x
- say sin x '=' result
- 'TAN' x
- say tan x '=' result
- 'ACOS' x
- say acos x '=' result
- 'ASIN' x
- say asin x '=' result
- 'ATAN' x
- say atan x '=' result
- 'HCOS' x
- say hcos x '=' result
- 'HSIN' x
- say hsin x '=' result
- 'HTAN' x
- say htan x '=' result
- 'EXP' x
- say exp x '=' result
- 'SQR' x
- say sqr x '=' result
- 'LOG' x
- say log x '=' result
- 'LOG10' x
- say log10 x '=' result
- 'R2D' x
- y = result
- say r2d x '=' y
- 'D2R' y
- say d2r y '=' result
- say ""
- say "String manipulation"
- say "-------------------"
- 'REPLACE' t '" "' '""'
- say t 'without spaces is' q || result || q
- 'CRC32' t
- say crc32 'of' t 'is' result
-